﻿Imports System.Data.SQLite


Public Class Conexion
    Private Conexion As SQLiteConnection


    Public Sub New()
        Conexion = New SQLiteConnection("Data Source=c:/padel.sqlite")

    End Sub

    Public Function AbrirDB() As String
        Try
            Conexion.Open()
            Return "Bien"
        Catch ex As Exception
            Return ex.Message
        End Try
    End Function

    Public Function InsertarCliente(ByRef Cli As Cliente) As Boolean
        Dim Cmd As SQLiteCommand = New SQLiteCommand(Me.Conexion)

        If (Cmd.ExecuteNonQuery() > 0) Then
            Return True
        Else
            Return False
        End If


    End Function




End Class
